package com.tpc.control.jpa;

import java.sql.Timestamp;
import java.util.List;
import java.util.Set;

/**
 * Interface for ReserveHeaderDAO.
 * 
 * @author MyEclipse Persistence Tools
 */

public interface IReserveHeaderDAO {
	/**
	 * Perform an initial save of a previously unsaved ReserveHeader entity. All
	 * subsequent persist actions of this entity should use the #update()
	 * method. This operation must be performed within the a database
	 * transaction context for the entity's data to be permanently saved to the
	 * persistence store, i.e., database. This method uses the
	 * {@link javax.persistence.EntityManager#persist(Object)
	 * EntityManager#persist} operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * IReserveHeaderDAO.save(entity);
	 * EntityManagerHelper.commit();
	 * </pre>
	 * 
	 * @param entity
	 *            ReserveHeader entity to persist
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void save(ReserveHeader entity);

	/**
	 * Delete a persistent ReserveHeader entity. This operation must be
	 * performed within the a database transaction context for the entity's data
	 * to be permanently deleted from the persistence store, i.e., database.
	 * This method uses the
	 * {@link javax.persistence.EntityManager#remove(Object)
	 * EntityManager#delete} operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * IReserveHeaderDAO.delete(entity);
	 * EntityManagerHelper.commit();
	 * entity = null;
	 * </pre>
	 * 
	 * @param entity
	 *            ReserveHeader entity to delete
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void delete(ReserveHeader entity);

	/**
	 * Persist a previously saved ReserveHeader entity and return it or a copy
	 * of it to the sender. A copy of the ReserveHeader entity parameter is
	 * returned when the JPA persistence mechanism has not previously been
	 * tracking the updated entity. This operation must be performed within the
	 * a database transaction context for the entity's data to be permanently
	 * saved to the persistence store, i.e., database. This method uses the
	 * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
	 * operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * entity = IReserveHeaderDAO.update(entity);
	 * EntityManagerHelper.commit();
	 * </pre>
	 * 
	 * @param entity
	 *            ReserveHeader entity to update
	 * @return ReserveHeader the persisted ReserveHeader entity instance, may
	 *         not be the same
	 * @throws RuntimeException
	 *             if the operation fails
	 */
	public ReserveHeader update(ReserveHeader entity);

	public ReserveHeader findById(String id);

	/**
	 * Find all ReserveHeader entities with a specific property value.
	 * 
	 * @param propertyName
	 *            the name of the ReserveHeader property to query
	 * @param value
	 *            the property value to match
	 * @return List<ReserveHeader> found by query
	 */
	public List<ReserveHeader> findByProperty(String propertyName, Object value);

	public List<ReserveHeader> findByCustomer(Object customer);

	public List<ReserveHeader> findByCustomerName(Object customerName);

	public List<ReserveHeader> findByCreateBy(Object createBy);

	public List<ReserveHeader> findByChangeBy(Object changeBy);

	/**
	 * Find all ReserveHeader entities.
	 * 
	 * @return List<ReserveHeader> all ReserveHeader entities
	 */
	public List<ReserveHeader> findAll();
}